import Https from '@/utils/https'

// 获取单个模型
const getModelById = (params) => Https.get('/api/v1/normalization/modeldesign/model/getModelById', params)
// 新建模型
const saveNewModel = (params) => Https.post('/api/v1/normalization/modeldesign/model/saveNewModel', params)
// 模型页面, 主题菜单列表
const getThemeList = (params) => Https.get('/api/v1/normalization/modeldesign/model/getThemeList', params)
// 获取当前存储类型
const getStorageType = () => Https.get('/api/v1/normalization/modeldesign/model/getStorageType')
// 修改模型
const saveModel = (params) => Https.post('/api/v1/normalization/modeldesign/model/saveModel', params)
// 删除单个模型
const deleteModelById = (params) => Https.post('/api/v1/normalization/modeldesign/model/deleteModelById', params)
// 当没有模型id时，获取模型id
const getModelByTblId = (params) => Https.get('/api/v1/normalization/modeldesign/model/getModelByTblId', params)
// 获取schemas
const getSchemas = (params) => Https.get('/api/v1/normalization/modeldesign/model/getSchemas', params)

// 模型页面, 主题菜单列表
const getThemeMenus = (params) => Https.get('/api/v1/normalization/modeldesign/model/getThemeMenus', params)
// 获取数据字典
const getDictionaryList = () => Https.get('/api/v1/normalization/modeldesign/model/getDictionaryList')
const treeThemes = () => Https.get('/api/v1/normalization/modeldesign/model/treeThemes')
const saveTheme = (params) => Https.post('/api/v1/normalization/modeldesign/model/saveTheme', params)

export {
  getModelById, saveNewModel, getThemeList, getStorageType, saveModel, getDictionaryList, treeThemes, saveTheme,
  deleteModelById, getModelByTblId, getSchemas, getThemeMenus,
}
